import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Boton para entrar a ver los records del juego. 
 * 
 * @author Asael Hernández García
 * @version (a version number or a date)
 */
public class Records extends Boton
{
    /**
     * Act - do whatever the Records wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private ScoreBoard records;
    private Return back;
    
    public Records()
    {
        back = new Return();
    }
    
    public void act() 
    {
        if(Greenfoot.mouseClicked(this)){
            records = new ScoreBoard(getWorld().getWidth(), getWorld().getHeight());
            getWorld().addObject(records , getWorld().getWidth()/2, getWorld().getHeight()/2);
            getWorld().addObject(back,40,33);
        }
    }    
}
